<template>
  <div>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="专利奖" name="first">
        <el-row type="flex" justify="space-between">
          <el-col>
            <el-button type="primary" @click="clickCreat">
              添加专利奖
            </el-button>
            <el-button type="success" @click="patentImport = true">
              导入
            </el-button>
          </el-col>
          <el-col>
            <div style="display: flex; justify-content: flex-end">
              <el-input
                v-model="form.search"
                clearable
                style="width: 300px; margin-left: 15px"
                placeholder="搜索专利名称、奖项、年份、奖项名称、专利号、所属单位"
                class="input-with-select"
                @clear="clear"
              >
                <el-button
                  slot="append"
                  style="
                    background-color: #45a321;
                    color: #fff;
                    border-radius: 0;
                    border: 1px solid #45a321;
                  "
                  @click="searchVal"
                >
                  搜索
                </el-button>
                <i slot="prefix-icon" class="el-icon-search" />
              </el-input>
            </div>
          </el-col>
        </el-row>
        <el-table
          align="center"
          :data="list.list"
          border
          style="width: 100%; margin: 20px 0"
        >
          <el-table-column align="center" prop="name" label="名称" />
          <!-- <el-table-column align="center" prop="prize" label="奖项" /> -->
          <el-table-column align="center" prop="years" label="年份" />
          <el-table-column align="center" prop="address" label="镇街" />
          <el-table-column align="center" prop="ano" label="专利号" />
          <el-table-column align="center" prop="company" label="所属单位" />
          <el-table-column align="center" prop="myorder" label="排序" />
          <el-table-column align="center" label="操作">
            <template slot-scope="scope">
              <el-button
                class="editText"
                type="text"
                @click="clickEdit(scope.row.id)"
              >
                修改
              </el-button>
              <el-button
                class="deletText"
                type="text"
                @click="deletUser(scope.row.id)"
              >
                删除
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="pagination">
          <el-pagination
            background
            :current-page="list.page"
            :page-size="list.size"
            layout="total, prev, pager, next, jumper"
            :total="parseInt(list.count)"
            align="left"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
        </div>
      </el-tab-pane>
      <!-- 国家示范企业 -->
      <el-tab-pane
        label="国家示范企业"
        name="second"
        @tab-click="getCompanyList(1)"
      >
        <el-row type="flex" justify="space-between">
          <el-col>
            <el-button type="primary" @click="companyCreat">
              添加示范公司
            </el-button>
            <el-button type="success" @click="demonstrationImport = true">
              导入
            </el-button>
          </el-col>
          <el-col>
            <div style="display: flex; justify-content: flex-end">
              <el-input
                v-model="CompanyArr.search"
                clearable
                style="width: 300px; margin-left: 15px"
                placeholder="搜索公司名称"
                class="input-with-select"
                @clear="companyclear"
              >
                <el-button
                  slot="append"
                  style="
                    background-color: #45a321;
                    color: #fff;
                    border-radius: 0;
                    border: 1px solid #45a321;
                  "
                  @click="companyVal"
                >
                  搜索
                </el-button>
                <i slot="prefix-icon" class="el-icon-search" />
              </el-input>
            </div>
          </el-col>
        </el-row>
        <el-table
          align="center"
          :data="Company.list"
          border
          style="width: 100%; margin: 20px 0"
        >
          <!-- <el-table-column align="center" label="封面图">
            <template slot-scope="scope">
              <div style="position: relative; width: 100%; padding-top: 56%">
                <img
                  :src="scope.row.tpic"
                  alt=""
                  style="
                    width: 100%;
                    height: 100%;
                    position: absolute;
                    left: 0px;
                    top: 0px;
                  "
                />
              </div>
            </template>
          </el-table-column>-->
          <el-table-column align="center" prop="name" label="企业名称" />
          <el-table-column align="center" prop="years" label="年份" />
          <el-table-column align="center" prop="address" label="街镇" />
          <el-table-column align="center" prop="myorder" label="排序" />
          <el-table-column align="center" label="操作">
            <template slot-scope="scope">
              <el-button
                class="editText"
                type="text"
                @click="CompanyEdit(scope.row.id)"
              >
                修改
              </el-button>
              <el-button
                class="deletText"
                type="text"
                @click="CompanytUser(scope.row.id)"
              >
                删除
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="pagination">
          <el-pagination
            background
            :current-page="Company.page"
            :page-size="Company.size"
            layout="total, prev, pager, next, jumper"
            :total="parseInt(Company.count)"
            align="left"
            @size-change="handleSizeexamples"
            @current-change="handleCurrentexamples"
          />
        </div>
      </el-tab-pane>
      <!-- 省级示范企业 -->
      <el-tab-pane
        label="省级示范企业"
        name="last"
        @tab-click="getCompanyList(2)"
      >
        <el-row type="flex" justify="space-between">
          <el-col>
            <el-button type="primary" @click="provinceCreat">
              添加示范公司
            </el-button>
            <el-button type="success" @click="provinceImport = true">
              导入
            </el-button>
          </el-col>
          <el-col>
            <div style="display: flex; justify-content: flex-end">
              <el-input
                v-model="CompanyArr.search"
                clearable
                style="width: 300px; margin-left: 15px"
                placeholder="搜索公司名称"
                class="input-with-select"
                @clear="companyclear"
              >
                <el-button
                  slot="append"
                  style="
                    background-color: #45a321;
                    color: #fff;
                    border-radius: 0;
                    border: 1px solid #45a321;
                  "
                  @click="companyVal"
                >
                  搜索
                </el-button>
                <i slot="prefix-icon" class="el-icon-search" />
              </el-input>
            </div>
          </el-col>
        </el-row>
        <el-table
          align="center"
          :data="Company.list"
          border
          style="width: 100%; margin: 20px 0"
        >
          <!-- <el-table-column align="center" label="封面图">
            <template slot-scope="scope">
              <div style="position: relative; width: 100%; padding-top: 56%">
                <img
                  :src="scope.row.tpic"
                  alt=""
                  style="
                    width: 100%;
                    height: 100%;
                    position: absolute;
                    left: 0px;
                    top: 0px;
                  "
                />
              </div>
            </template>
          </el-table-column>-->
          <el-table-column align="center" prop="name" label="企业名称" />
          <el-table-column align="center" prop="years" label="年份" />
          <el-table-column align="center" prop="address" label="街镇" />
          <el-table-column align="center" prop="myorder" label="排序" />
          <el-table-column align="center" label="操作">
            <template slot-scope="scope">
              <el-button
                class="editText"
                type="text"
                @click="CompanyEdit(scope.row.id)"
              >
                修改
              </el-button>
              <el-button
                class="deletText"
                type="text"
                @click="CompanytUser(scope.row.id)"
              >
                删除
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="pagination">
          <el-pagination
            background
            :current-page="Company.page"
            :page-size="Company.size"
            layout="total, prev, pager, next, jumper"
            :total="parseInt(Company.count)"
            align="left"
            @size-change="provinceSizeexamples"
            @current-change="provinceCurrentexamples"
          />
        </div>
      </el-tab-pane>
      <!-- 国家优势企业 -->
      <el-tab-pane
        label="国家优势企业"
        name="advantage"
        @tab-click="getCompanyList(3)"
      >
        <el-row type="flex" justify="space-between">
          <el-col>
            <el-button type="primary" @click="advantageCreat">
              添加优势公司
            </el-button>
            <el-button type="success" @click="advantageImport = true">
              导入
            </el-button>
          </el-col>
          <el-col>
            <div style="display: flex; justify-content: flex-end">
              <el-input
                v-model="CompanyArr.search"
                clearable
                style="width: 300px; margin-left: 15px"
                placeholder="搜索公司名称"
                class="input-with-select"
                @clear="companyclear"
              >
                <el-button
                  slot="append"
                  style="
                    background-color: #45a321;
                    color: #fff;
                    border-radius: 0;
                    border: 1px solid #45a321;
                  "
                  @click="companyVal"
                >
                  搜索
                </el-button>
                <i slot="prefix-icon" class="el-icon-search" />
              </el-input>
            </div>
          </el-col>
        </el-row>
        <el-table
          align="center"
          :data="Company.list"
          border
          style="width: 100%; margin: 20px 0"
        >
          <!-- <el-table-column align="center" label="封面图">
            <template slot-scope="scope">
              <div style="position: relative; width: 100%; padding-top: 56%">
                <img
                  :src="scope.row.tpic"
                  alt=""
                  style="
                    width: 100%;
                    height: 100%;
                    position: absolute;
                    left: 0px;
                    top: 0px;
                  "
                />
              </div>
            </template>
          </el-table-column>-->
          <el-table-column align="center" prop="name" label="企业名称" />
          <el-table-column align="center" prop="years" label="年份" />
          <el-table-column align="center" prop="address" label="街镇" />
          <el-table-column align="center" prop="myorder" label="排序" />
          <el-table-column align="center" label="操作">
            <template slot-scope="scope">
              <el-button
                class="editText"
                type="text"
                @click="CompanyEdit(scope.row.id)"
              >
                修改
              </el-button>
              <el-button
                class="deletText"
                type="text"
                @click="CompanytUser(scope.row.id)"
              >
                删除
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="pagination">
          <el-pagination
            background
            :current-page="Company.page"
            :page-size="Company.size"
            layout="total, prev, pager, next, jumper"
            :total="parseInt(Company.count)"
            align="left"
            @size-change="advantageSizeexamples"
            @current-change="advantageCurrentexamples"
          />
        </div>
      </el-tab-pane>
      <!-- 驰名商标 -->
      <el-tab-pane label="驰名商标" name="second3">
        <el-row type="flex" justify="space-between">
          <el-col>
            <el-button type="primary" @click="knownCreat">
              添加驰名商标
            </el-button>
            <el-button type="success" @click="trademarkImport = true">
              导入
            </el-button>
          </el-col>
          <el-col>
            <div style="display: flex; justify-content: flex-end">
              <el-input
                v-model="knownArr.search"
                clearable
                style="width: 300px; margin-left: 15px"
                placeholder="搜索公司名称"
                class="input-with-select"
                @clear="knownclear"
              >
                <el-button
                  slot="append"
                  style="
                    background-color: #45a321;
                    color: #fff;
                    border-radius: 0;
                    border: 1px solid #45a321;
                  "
                  @click="knownVal"
                >
                  搜索
                </el-button>
                <i slot="prefix-icon" class="el-icon-search" />
              </el-input>
            </div>
          </el-col>
        </el-row>
        <el-table
          align="center"
          :data="knownListArr"
          border
          style="width: 100%; margin: 20px 0"
        >
          <!-- <el-table-column align="center" label="封面图">
            <template slot-scope="scope">
              <div style="position: relative; width: 100%; padding-top: 56%">
                <img
                  :src="scope.row.tpic"
                  alt=""
                  style="
                    width: 100%;
                    height: 100%;
                    position: absolute;
                    left: 0px;
                    top: 0px;
                  "
                />
              </div>
            </template>
          </el-table-column>-->
          <el-table-column align="center" prop="name" label="公司名称" />
          <el-table-column align="center" prop="trade_name" label="商品名称" />
          <el-table-column
            align="center"
            prop="trade_shop"
            label="核定使用商品"
          />
          <el-table-column
            align="center"
            prop="reg_num"
            label="注册号(可填多个)"
          />
          <el-table-column align="center" prop="years" label="年份" />
          <el-table-column align="center" prop="address" label="街镇" />
          <el-table-column align="center" prop="myorder" label="排序" />
          <el-table-column align="center" label="操作">
            <template slot-scope="scope">
              <el-button
                class="editText"
                type="text"
                @click="knownEdit(scope.row.id)"
              >
                修改
              </el-button>
              <el-button
                class="deletText"
                type="text"
                @click="knownUser(scope.row.id)"
              >
                删除
              </el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="pagination">
          <el-pagination
            background
            :current-page="known.page"
            :page-size="known.size"
            layout="total, prev, pager, next, jumper"
            :total="parseInt(known.count)"
            align="left"
            @size-change="handleSizetrademark"
            @current-change="handleCurrenttrademark"
          />
        </div>
      </el-tab-pane>
      <!-- <el-tab-pane label="地理标识" name="second4">
        <honorIdentification />
      </el-tab-pane>-->
      <el-tab-pane label="对话顺德" name="second5">
        <honorDialogue />
      </el-tab-pane>
    </el-tabs>
    <el-dialog
      title="专利奖"
      width="50%"
      top="10.8vh"
      :visible.sync="dialogVisible"
      :before-close="cancle"
      :close-on-click-modal="false"
    >
      <div class="mini">
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">专利名称</p>
          <div class="left_w">
            <el-input v-model="form.name" placeholder="请输入内容" />
          </div>
        </div>
        <!-- <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">奖项</p>
          <div class="left_w">
            <el-select v-model="form.prize" clearable placeholder="请选择">
              <el-option
                v-for="item in PrizeList"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              />
            </el-select>
          </div>
        </div>-->
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">年份</p>
          <div class="left_w">
            <el-input v-model="form.years" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">街镇</p>
          <div class="left_w">
            <el-input v-model="form.address" placeholder="请输入内容" />
          </div>
        </div>

        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">奖项名称</p>
          <div class="left_w">
            <el-input v-model="form.prize_name" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">专利号</p>
          <div class="left_w">
            <el-input v-model="form.ano" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">所属单位</p>
          <div class="left_w">
            <el-input v-model="form.company" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">排序</p>
          <div class="left_w">
            <el-input v-model="form.myorder" placeholder="请输入内容" />
          </div>
        </div>
      </div>

      <span slot="footer" class="dialog-footer">
        <el-button @click="cancle">取 消</el-button>
        <el-button type="primary" @click="save">保 存</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="省级示范企业"
      :visible.sync="provinceVisible"
      width="50%"
      top="10.8vh"
      :before-close="Companycancle"
      :close-on-click-modal="false"
    >
      <div class="mini">
        <!-- <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">封面图</p>
          <div class="left_w s_flex s_align_items">
            <div style="margin-right: 20px">
              <el-upload
                class="upload-demo"
                :on-success="onSuccess"
                :show-file-list="false"
                :action="`${VUE_APP_BASE_API}/v1/index/upload `"
              >
                
                <el-button type="primary"> 上传封面图 </el-button>
              </el-upload>
            </div>
            <el-button
              v-if="CompanyArr.tpic"
              type="danger"
              @click="CompanyArr.tpic = ''"
            >
              删除
            </el-button>
          </div>
        </div>-->
        <!-- <div v-if="CompanyArr.tpic" class="news_mrt">
          <img style="width: 15%" :src="CompanyArr.tpic" />
        </div>-->
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">公司名称</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.name" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">年份</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.years" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">街镇</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.address" placeholder="请输入内容" />
          </div>
        </div>
        <!-- <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">公司网址</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.href" placeholder="请输入内容" />
          </div>
        </div>-->
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">排序</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.myorder" placeholder="请输入内容" />
          </div>
        </div>
      </div>

      <span slot="footer" class="dialog-footer">
        <el-button @click="Companycancle">取 消</el-button>
        <el-button type="primary" @click="CompanySave">保 存</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="国家示范企业"
      :visible.sync="companyVisible"
      width="50%"
      top="10.8vh"
      :before-close="Companycancle"
      :close-on-click-modal="false"
    >
      <div class="mini">
        <!-- <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">封面图</p>
          <div class="left_w s_flex s_align_items">
            <div style="margin-right: 20px">
              <el-upload
                class="upload-demo"
                :on-success="onSuccess"
                :show-file-list="false"
                :action="`${VUE_APP_BASE_API}/v1/index/upload `"
              >
                <el-button type="primary"> 上传封面图 </el-button>
              </el-upload>
            </div>
            <el-button
              v-if="CompanyArr.tpic"
              type="danger"
              @click="CompanyArr.tpic = ''"
            >
              删除
            </el-button>
          </div>
        </div>
        <div v-if="CompanyArr.tpic" class="news_mrt">
          <img style="width: 15%" :src="CompanyArr.tpic" />
        </div>-->
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">公司名称</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.name" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">年份</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.years" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">街镇</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.address" placeholder="请输入内容" />
          </div>
        </div>
        <!-- <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">公司网址</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.href" placeholder="请输入内容" />
          </div>
        </div>-->
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">排序</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.myorder" placeholder="请输入内容" />
          </div>
        </div>
      </div>

      <span slot="footer" class="dialog-footer">
        <el-button @click="Companycancle">取 消</el-button>
        <el-button type="primary" @click="CompanySave">保 存</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="国家优势企业"
      :visible.sync="advantageVisible"
      width="50%"
      top="10.8vh"
      :before-close="Companycancle"
      :close-on-click-modal="false"
    >
      <div class="mini">
        <!-- <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">封面图</p>
          <div class="left_w s_flex s_align_items">
            <div style="margin-right: 20px">
              <el-upload
                class="upload-demo"
                :on-success="onSuccess"
                :show-file-list="false"
                :action="`${VUE_APP_BASE_API}/v1/index/upload `"
              >
                <el-button type="primary"> 上传封面图 </el-button>
              </el-upload>
            </div>
            <el-button
              v-if="CompanyArr.tpic"
              type="danger"
              @click="CompanyArr.tpic = ''"
            >
              删除
            </el-button>
          </div>
        </div>
        <div v-if="CompanyArr.tpic" class="news_mrt">
          <img style="width: 15%" :src="CompanyArr.tpic" />
        </div>-->
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">公司名称</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.name" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">年份</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.years" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">街镇</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.address" placeholder="请输入内容" />
          </div>
        </div>
        <!-- <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">公司网址</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.href" placeholder="请输入内容" />
          </div>
        </div>-->
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">排序</p>
          <div class="left_w">
            <el-input v-model="CompanyArr.myorder" placeholder="请输入内容" />
          </div>
        </div>
      </div>

      <span slot="footer" class="dialog-footer">
        <el-button @click="Companycancle">取 消</el-button>
        <el-button type="primary" @click="CompanySave">保 存</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="驰名商标"
      :before-close="knowncancle"
      :visible.sync="knownVisible"
      width="50%"
      top="10.8vh"
      :close-on-click-modal="false"
    >
      <div class="mini">
        <!-- <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">封面图</p>
          <div class="left_w s_flex s_align_items">
            <div style="margin-right: 20px">
              <el-upload
                class="upload-demo"
                :on-success="onSuccess2"
                :show-file-list="false"
                :action="`${VUE_APP_BASE_API}/v1/index/upload `"
              >
                <el-button type="primary"> 上传封面图 </el-button>
              </el-upload>
            </div>
            <el-button
              v-if="knownArr.tpic"
              type="danger"
              @click="knownArr.tpic = ''"
            >
              删除
            </el-button>
          </div>
        </div>-->
        <!-- <div v-if="knownArr.tpic" class="news_mrt">
          <img style="width: 15%" :src="knownArr.tpic" />
        </div>-->
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">公司名称</p>
          <div class="left_w">
            <el-input v-model="knownArr.name" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">商标名称</p>
          <div class="left_w">
            <el-input v-model="knownArr.trade_name" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">核定使用商品</p>
          <div class="left_w">
            <el-input v-model="knownArr.trade_shop" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">注册号(可填多个)</p>
          <div class="left_w">
            <el-input v-model="knownArr.reg_num" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">年份</p>
          <div class="left_w">
            <el-input v-model="knownArr.years" placeholder="请输入内容" />
          </div>
        </div>
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">街镇</p>
          <div class="left_w">
            <el-input v-model="knownArr.address" placeholder="请输入内容" />
          </div>
        </div>
        <!-- <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">公司网址</p>
          <div class="left_w">
            <el-input v-model="knownArr.href" placeholder="请输入内容" />
          </div>
        </div>-->
        <div class="s_flex s_align_items news_mrt">
          <p style="width: 15%">排序</p>
          <div class="left_w">
            <el-input v-model="knownArr.myorder" placeholder="请输入内容" />
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="knowncancle">取 消</el-button>
        <el-button type="primary" @click="knownSave">保 存</el-button>
      </span>
    </el-dialog>
    <!-- 专利奖 -->
    <el-dialog
      :visible.sync="patentImport"
      width="25%"
      :destroy-on-close="true"
    >
      <div>
        <div>
          <div style="margin-bottom: 30px">
            <div class="sq_tilte4 sq_tilte_color" style="margin-bottom: 20px">
              1.请先下载导入模块
            </div>
            <el-button type="primary" style="padding: 8px 20px">
              <a
                :href="`${VUE_APP_BASE_API}/office/patent.xlsx`"
                download="专利奖导入模块.xlsx"
                >下载模板</a
              >
            </el-button>
          </div>
          <div style="margin-bottom: 30px">
            <div class="sq_tilte4 sq_tilte_color" style="margin-bottom: 20px">
              2.请上传填写好的模块
            </div>
            <el-upload
              class="upload-demo"
              action
              :on-change="handleChange"
              :on-exceed="handleExceed"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :file-list="fileListUpload"
              :limit="limitUpload"
              accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
              :auto-upload="false"
            >
              <el-button type="primary" style="padding: 7px 34px">
                上传
              </el-button>
            </el-upload>
          </div>
        </div>
        <div>
          <el-button
            class="pubBtn"
            style="width: 100%; margin: 40px 0; height: 44px"
            type="button"
            @click="enterExe"
          >
            导入
          </el-button>
        </div>
      </div>
    </el-dialog>
    <!-- 国家示范 -->
    <el-dialog
      :visible.sync="demonstrationImport"
      width="25%"
      :destroy-on-close="true"
    >
      <div>
        <div>
          <div style="margin-bottom: 30px">
            <div class="sq_tilte4 sq_tilte_color" style="margin-bottom: 20px">
              1.请先下载导入模块
            </div>
            <el-button type="primary" style="padding: 8px 20px">
              <a :href="`${VUE_APP_BASE_API}/office/examples_company1.xlsx`"
                >下载模板</a
              >
            </el-button>
          </div>
          <div style="margin-bottom: 30px">
            <div class="sq_tilte4 sq_tilte_color" style="margin-bottom: 20px">
              2.请上传填写好的模块
            </div>
            <el-upload
              class="upload-demo"
              action
              :on-change="handleChange"
              :on-exceed="handleExceed"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :file-list="fileListUpload"
              :limit="limitUpload"
              accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
              :auto-upload="false"
            >
              <el-button type="primary" style="padding: 7px 34px">
                上传
              </el-button>
            </el-upload>
          </div>
        </div>
        <div>
          <el-button
            class="pubBtn"
            style="width: 100%; margin: 40px 0; height: 44px"
            type="button"
            @click="countriesExe"
          >
            导入
          </el-button>
        </div>
      </div>
    </el-dialog>
    <!-- 国家优势 -->
    <el-dialog
      :visible.sync="advantageImport"
      width="25%"
      :destroy-on-close="true"
    >
      <div>
        <div>
          <div style="margin-bottom: 30px">
            <div class="sq_tilte4 sq_tilte_color" style="margin-bottom: 20px">
              1.请先下载导入模块
            </div>
            <el-button type="primary" style="padding: 8px 20px">
              <a :href="`${VUE_APP_BASE_API}/office/examples_company3.xlsx`"
                >下载模板</a
              >
            </el-button>
          </div>
          <div style="margin-bottom: 30px">
            <div class="sq_tilte4 sq_tilte_color" style="margin-bottom: 20px">
              2.请上传填写好的模块
            </div>
            <el-upload
              class="upload-demo"
              action
              :on-change="handleChange"
              :on-exceed="handleExceed"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :file-list="fileListUpload"
              :limit="limitUpload"
              accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
              :auto-upload="false"
            >
              <el-button type="primary" style="padding: 7px 34px">
                上传
              </el-button>
            </el-upload>
          </div>
        </div>
        <div>
          <el-button
            class="pubBtn"
            style="width: 100%; margin: 40px 0; height: 44px"
            type="button"
            @click="advantageExe"
          >
            导入
          </el-button>
        </div>
      </div>
    </el-dialog>
    <!-- 省 -->
    <el-dialog
      :visible.sync="provinceImport"
      width="25%"
      :destroy-on-close="true"
    >
      <div>
        <div>
          <div style="margin-bottom: 30px">
            <div class="sq_tilte4 sq_tilte_color" style="margin-bottom: 20px">
              1.请先下载导入模块
            </div>
            <el-button type="primary" style="padding: 8px 20px">
              <a :href="`${VUE_APP_BASE_API}/office/examples_company2.xlsx`"
                >下载模板</a
              >
            </el-button>
          </div>
          <div style="margin-bottom: 30px">
            <div class="sq_tilte4 sq_tilte_color" style="margin-bottom: 20px">
              2.请上传填写好的模块
            </div>
            <el-upload
              class="upload-demo"
              action
              :on-change="handleChange"
              :on-exceed="handleExceed"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :file-list="fileListUpload"
              :limit="limitUpload"
              accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
              :auto-upload="false"
            >
              <el-button type="primary" style="padding: 7px 34px">
                上传
              </el-button>
            </el-upload>
          </div>
        </div>
        <div>
          <el-button
            class="pubBtn"
            style="width: 100%; margin: 40px 0; height: 44px"
            type="button"
            @click="provinceExe"
          >
            导入
          </el-button>
        </div>
      </div>
    </el-dialog>
    <!-- 商标 -->
    <el-dialog
      :visible.sync="trademarkImport"
      width="25%"
      :destroy-on-close="true"
    >
      <div>
        <div>
          <div style="margin-bottom: 30px">
            <div class="sq_tilte4 sq_tilte_color" style="margin-bottom: 20px">
              1.请先下载导入模块
            </div>
            <el-button type="primary" style="padding: 8px 20px">
              <a :href="`${VUE_APP_BASE_API}/office/trademark.xlsx`"
                >下载模板</a
              >
            </el-button>
          </div>
          <div style="margin-bottom: 30px">
            <div class="sq_tilte4 sq_tilte_color" style="margin-bottom: 20px">
              2.请上传填写好的模块
            </div>
            <el-upload
              class="upload-demo"
              action
              :on-change="handleChange"
              :on-exceed="handleExceed"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              :file-list="fileListUpload"
              :limit="limitUpload"
              accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
              :auto-upload="false"
            >
              <el-button type="primary" style="padding: 7px 34px">
                上传
              </el-button>
            </el-upload>
          </div>
        </div>
        <div>
          <el-button
            class="pubBtn"
            style="width: 100%; margin: 40px 0; height: 44px"
            type="button"
            @click="brandExcel"
          >
            导入
          </el-button>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { VUE_APP_BASE_API } from "@/config.js";
import {
  honorPatentList,
  honorPatentAdd,
  honorPatentEdit,
  honorPatentDel,
  honorPatentInfo,
  honorExamplesList,
  honorExamplesAdd,
  honorExamplesEdit,
  honorExamplesDel,
  honorExamplesInfo,
  honorKnownDel,
  honorKnownEdit,
  honorKnownInfo,
  honorKnownAdd,
  honorKnownList,
  patentExcel,
  trademarkExcel,
  enterpriseExcel,
  upload,
} from "@/api/adminWeb";
import Editor from "@/components/Editor";
import honorDialogue from "./honor_dialogue.vue";
import honorIdentification from "./honor_identification.vue";
export default {
  components: {
    Editor,
    honorDialogue,
    honorIdentification,
  },
  data() {
    return {
      fileTemp: "",
      fileList: [],
      excelData: [],
      fileListUpload: "",
      dataList: [{}],
      limitUpload: 1,
      patentImport: false,
      provinceImport: false,
      demonstrationImport: false,
      advantageImport: false,
      VUE_APP_BASE_API,
      list: [],
      activeName: "first",
      dialogVisible: false,
      companyVisible: false,
      advantageVisible: false,
      provinceVisible: false,
      knownVisible: false,
      trademarkImport: false,
      form: {
        honor_patent_id: "",
        name: "",
        company: "",
        prize: "",
        prize_name: "",
        ano: "",
        years: "",
        address: "",
        myorder: "",
        company: "",
      },
      CompanyList: [],
      Company: [],
      CompanyArr: {
        company_id: "",
        myorder: "",
        tpic: "",
        search: "",
        name: "",
        href: "",
        address: "",
        years: "",
      },
      known: [],
      knownArr: {
        myorder: "",
        tpic: "",
        search: "",
        name: "",
        href: "",
        trade_name: "",
        trade_shop: "",
        reg_num: "",
        years: "",
        address: "",
      },
      type: 1,
      knownListArr: [],
      PrizeList: [
        {
          id: 1,
          name: "金奖",
        },
        {
          id: 2,
          name: "银奖",
        },
        {
          id: 3,
          name: "优秀奖",
        },
      ],
    };
  },
  mounted() {
    this.getLIst();
    // this.getWebCompanyList();
    this.getCompanyList();
    this.knownList();
  },
  methods: {
    // 国家示范导入
    countriesExe() {
      // console.log(this.fileTemp);
      if (!this.fileTemp) {
        this.$message({
          type: "warning",
          message: "请先选择文件",
        });
        return;
      }
      this.hanlderNational(this.fileTemp);
      this.$message.success("导入成功");
      this.demonstrationImport = false;
      setTimeout(() => {
        this.getCompanyList(1);
      }, 500);
    },
    // 国家示范接口
    hanlderNational(obj) {
      let formdata = new FormData();
      formdata.set("file", obj);
      upload(formdata, {
        "Content-Type": "multipart/form-data",
      })
        .then((res) => {
          enterpriseExcel({ file: res.url, type: 1 });
        })
        .catch((err) => {});
    },
    // 国家优势导入
    advantageExe() {
      // console.log(this.fileTemp);
      if (!this.fileTemp) {
        this.$message({
          type: "warning",
          message: "请先选择文件",
        });
        return;
      }
      this.advantageNational(this.fileTemp);
      this.$message.success("导入成功");
      this.advantageImport = false;
      setTimeout(() => {
        this.getCompanyList(3);
      }, 500);
    },
    // 国家优势接口
    advantageNational(obj) {
      let formdata = new FormData();
      formdata.set("file", obj);
      upload(formdata, {
        "Content-Type": "multipart/form-data",
      })
        .then((res) => {
          enterpriseExcel({ file: res.url, type: 3 });
        })
        .catch((err) => {});
    },
    // 省级企业导入
    provinceExe() {
      // console.log(this.fileTemp);
      if (!this.fileTemp) {
        this.$message({
          type: "warning",
          message: "请先选择文件",
        });
        return;
      }
      this.hanlderProvincial(this.fileTemp);
      this.provinceImport = false;
      this.$message.success("导入成功");
      setTimeout(() => {
        this.getCompanyList(2);
      }, 500);
    },
    // 省级企业接口
    hanlderProvincial(obj) {
      let formdata = new FormData();
      formdata.set("file", obj);
      upload(formdata, {
        "Content-Type": "multipart/form-data",
      })
        .then((res) => {
          enterpriseExcel({ file: res.url, type: 2 });
        })
        .catch((err) => {});
    },
    brandExcel() {
      // console.log(this.fileTemp);
      if (!this.fileTemp) {
        this.$message({
          type: "warning",
          message: "请先选择文件",
        });
        return;
      }
      this.importbrand(this.fileTemp);
      this.$message.success("导入成功");
      this.trademarkImport = false;
      setTimeout(() => {
        this.knownList();
      }, 500);
    },
    enterExe() {
      // console.log(this.fileTemp);
      if (!this.fileTemp) {
        this.$message({
          type: "warning",
          message: "请先选择文件",
        });
        return;
      }
      this.importfxx(this.fileTemp);
      this.$message.success("导入成功");
      this.patentImport = false;
      setTimeout(() => {
        this.getLIst();
      }, 500);
    },
    handleChange(file, fileList) {
      this.fileTemp = file.raw;
      if (this.fileTemp) {
        // console.log(this.fileTemp.type)
        if (
          this.fileTemp.type ==
            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
          this.fileTemp.type == "application/vnd.ms-excel"
        ) {
          // this.importfxx(this.fileTemp);
        } else {
          this.$message({
            type: "warning",
            message: "附件格式错误，请删除后重新上传!",
          });
        }
      }
    },
    importfxx(obj) {
      // let file = obj.blob() //数据流
      let formdata = new FormData();
      formdata.set("file", obj);
      upload(formdata, {
        "Content-Type": "multipart/form-data",
      })
        .then((res) => {
          patentExcel({ file: res.url });
        })
        .catch((err) => {});
      //if (!FileReader.prototype.readAsBinaryString) {
    },
    importbrand(obj) {
      // let file = obj.blob() //数据流
      let formdata = new FormData();
      formdata.set("file", obj);
      upload(formdata, {
        "Content-Type": "multipart/form-data",
      })
        .then((res) => {
          trademarkExcel({ file: res.url });
        })
        .catch((err) => {});
      //if (!FileReader.prototype.readAsBinaryString) {
    },
    beforeRemove(file, fileList) {
      return this.$confirm(`确定移除 ${file.name}？`);
    },
    handleRemove(file, fileList) {
      // console.log(file)
      this.fileTemp = null;
    },
    handleExceed(files, fileList) {
      this.$message.warning(
        `当前限制选择1个文件，本次选择了 ${files.length} 个文件，共选择了 ${
          files.length + fileList.length
        } 个文件`
      );
    },
    async getCompanyList(type = 1) {
      try {
        this.Company = await honorExamplesList({
          keyword: this.CompanyArr.search,
          type,
        });
      } catch (error) {
        this.$message.error(error.message);
      }
    },

    async getWebCompanyList() {
      try {
        this.CompanyList = await WebCompanyList();
        this.PrizeList = await getPrize();
      } catch (error) {
        this.$message.error(error.message);
      }
    },
    async knownList() {
      try {
        const resUser = await honorKnownList({
          keyword: this.knownArr.search,
        });
        this.knownListArr = resUser.list;
        this.known = resUser;
      } catch (error) {
        this.$message.error(error.message);
      }
    },
    handleClick(params) {
      const { index } = params;
      const type = Number(index);
      this.type = type;
      if (type == 1 || type == 2 || type == 3) {
        this.getCompanyList(type);
      }
    },
    searchVal() {
      this.getLIst();
    },
    companyVal() {
      this.getCompanyList();
    },
    companyCreat() {
      this.companyVisible = true;
    },
    advantageCreat() {
      this.advantageVisible = true;
    },
    provinceCreat() {
      this.provinceVisible = true;
    },
    knownCreat() {
      this.knownVisible = true;
    },
    knownclear() {
      this.getKnownList();
    },
    knownVal() {
      this.getKnownList();
    },
    clickCreat() {
      this.dialogVisible = true;
    },
    async clickEdit(id) {
      try {
        this.form = await honorPatentInfo({
          honor_patent_id: id,
        });
        this.contentDesc = this.form.content;
        this.dialogVisible = true;
      } catch (error) {
        this.$message.error(error.message);
      }
    },

    async CompanyEdit(id) {
      try {
        this.CompanyArr = await honorExamplesInfo({
          honor_examples_id: id,
          type:this.type
        });
        this.getCompanyList(this.type);
        this.companyVisible = true;
        this.provinceVisible = true;
        this.advantageVisible = true;
      } catch (error) {
        this.$message.error(error.message);
      }
    },
    async knownEdit(id) {
      try {
        this.knownArr = await honorKnownInfo({
          honor_trademark_id: id,
        });
        this.knownVisible = true;
      } catch (error) {
        this.$message.error(error.message);
      }
    },

    deletUser(id) {
      this.$confirm("此操作将删除, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(async () => {
          try {
            await honorPatentDel({
              honor_patent_id: id,
            });
            this.getLIst();
            this.$message({
              type: "success",
              message: "删除成功",
            });
          } catch (error) {
            this.$message.error(error.message);
          }
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    CompanytUser(id) {
      this.$confirm("此操作将删除, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",  
      })
        .then(async () => {
          try {
            await honorExamplesDel({
              honor_examples_id: id,
              type:this.type
            });
            this.getCompanyList(this.type);
            this.$message({
              type: "success",
              message: "删除成功",
            });
          } catch (error) {
            this.$message.error(error.message);
          }
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    knownUser(id) {
      this.$confirm("此操作将删除, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(async () => {
          try {
            await honorKnownDel({
              honor_trademark_id: id,
            });
            this.knownList();
            this.$message({
              type: "success",
              message: "删除成功",
            });
          } catch (error) {
            this.$message.error(error.message);
          }
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },

    clear() {
      this.getLIst();
    },
    companyclear() {
      this.getCompanyList();
    },
    handleClose() {
      this.clearDesc = 1;
      this.dialogVisible = false;
    },
    async getLIst() {
      try {
        this.list = await honorPatentList({
          keyword: this.form.search,
        });
      } catch (error) {
        this.$message.error(error.message);
      }
    },
    descVal(val) {
      this.form.desc = val;
    },
    advantageVal(val) {
      this.form.advantage = val;
    },
    async save() {
      try {
        const {
          name,
          prize,
          prize_name,
          ano,
          years,
          myorder,
          company,
          address,
        } = this.form;
        if (this.form.id) {
          await honorPatentEdit({
            honor_patent_id: this.form.id,
            name,
            prize,
            prize_name,
            ano,
            years,
            myorder,
            company,
            address,
          });
          this.getLIst();
          this.$message.success("添加成功");
          this.dialogVisible = false;
          this.form = {
            product_id: "",
            name: "",
            company_id: "",
            search: "",
            myorder: "",
            prize: "",
            ano: "",
          };
        } else {
          await honorPatentAdd({
            name,
            prize,
            prize_name,
            ano,
            years,
            address,
            myorder,
            company,
          });
          this.getLIst();
          this.$message.success("添加成功");
          this.dialogVisible = false;
          this.form = {
            product_id: "",
            name: "",
            company_id: "",
            search: "",
            myorder: "",
            prize: "",
            ano: "",
          };
        }
      } catch (error) {
        this.$message.error(error.message);
      }
    },
    async CompanySave() {
      // console.log("this.type", this.type);
      const { name, tpic, href, myorder, years, address } = this.CompanyArr;
      try {
        if (this.CompanyArr.id) {
          await honorExamplesEdit({
            honor_examples_id: this.CompanyArr.id,
            name,
            tpic,
            href,
            myorder,
            years,
            address,
            type: this.type,
          });
          this.getCompanyList(this.type);
          this.CompanyArr = {
            company_id: "",
            myorder: "",
            comptitleany_id: "",
            tpic: "",
            search: "",
          };
          this.$message.success("添加成功");
          this.companyVisible = false;
          this.provinceVisible = false;
          this.advantageVisible = false;
        } else {
          await honorExamplesAdd({
            name,
            tpic,
            href,
            address,
            years,
            myorder,
            type: this.type,
          });
          this.getCompanyList(this.type);
          this.knownArr = {
            company_id: "",
            myorder: "",
            comptitleany_id: "",
            tpic: "",
            search: "",
          };
          this.$message.success("添加成功");
          this.companyVisible = false;
          this.provinceVisible = false;
          this.advantageVisible = false;
          this.CompanyArr = {};
        }
      } catch (error) {
        this.$message.error(error.message);
      }
    },
    async knownSave() {
      try {
        const {
          name,
          // tpic,
          href,
          myorder,
          years,
          address,
          trade_name,
          trade_shop,
          reg_num,
        } = this.knownArr;
        if (this.knownArr.id) {
          await honorKnownEdit({
            honor_trademark_id: this.knownArr.id,
            name,
            // tpic,
            href,
            myorder,
            years,
            address,
            trade_name,
            trade_shop,
            reg_num,
          });
          this.knownList();
          this.knownArr = {
            myorder: "",
            // tpic: "",
            search: "",
            name: "",
            years: "",
            address: "",
            trade_name: "",
            trade_shop: "",
            reg_num: "",
          };
          this.$message.success("添加成功");
          this.knownVisible = false;
        } else {
          await honorKnownAdd({
            name,
            // tpic,
            href,
            myorder,
            years,
            address,
            trade_name,
            trade_shop,
            reg_num,
          });
          this.knownList();
          this.knownArr = {
            myorder: "",
            // tpic: "",
            search: "",
            name: "",
            years: "",
            address: "",
            trade_name: "",
            trade_shop: "",
            reg_num: "",
          };
          this.$message.success("添加成功");
          this.knownVisible = false;
        }
      } catch (error) {
        this.$message.error(error.message);
      }
    },
    knowncancle() {
      this.knownVisible = false;
      this.knownArr = {
        myorder: "",
        // tpic: "",
        search: "",
        name: "",
        years: "",
        address: "",
        trade_name: "",
        trade_shop: "",
        reg_num: "",
      };
    },
    cancle() {
      this.dialogVisible = false;
      this.form = {
        product_id: "",
        name: "",
        company_id: "",
        search: "",
        myorder: "",
        prize: "",
        ano: "",
      };
    },
    Companycancle() {
      this.companyVisible = false;
      this.provinceVisible = false;
      this.advantageVisible = false;
      this.CompanyArr = {
        company_id: "",
        myorder: "",
        comptitleany_id: "",
        tpic: "",
        search: "",
        years: "",
        address: "",
      };
    },
    // 专利奖分页
    //每页下拉显示数据
    async handleSizeChange(size) {
      try {
        const resUser = await honorPatentList({
          keywords: this.form.search,
          page: size,
        });
        this.list = resUser;
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    //点击第几页
    async handleCurrentChange(currentPage) {
      try {
        const resUser = await honorPatentList({
          keywords: this.form.search,
          page: currentPage,
        });
        this.list = resUser;
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    // 国家示范企业分页
    //每页下拉显示数据
    async handleSizeexamples(size) {
      try {
        const resUser = await honorExamplesList({
          keywords: this.CompanyArr.search,
          type: 1,
          page: size,
        });
        this.Company = resUser;
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    //点击第几页
    async handleCurrentexamples(currentPage) {
      try {
        const resUser = await honorExamplesList({
          keywords: this.CompanyArr.search,
          type: 1,
          page: currentPage,
        });
        this.Company = resUser;
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    // 国家优势企业分页
     //每页下拉显示数据
    async advantageSizeexamples(size) {
      try {
        const resUser = await honorExamplesList({
          keywords: this.CompanyArr.search,
          type: 3,
          page: size,
        });
        this.Company = resUser;
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    //点击第几页
    async advantageCurrentexamples(currentPage) {
      try {
        const resUser = await honorExamplesList({
          keywords: this.CompanyArr.search,
          type: 3,
          page: currentPage,
        });
        this.Company = resUser;
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    // 省份企业分页
    //每页下拉显示数据
    async provinceSizeexamples(size) {
      try {
        const resUser = await honorExamplesList({
          type: 2,
          keywords: this.CompanyArr.search,
          page: size,
        });
        this.Company = resUser;
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    //点击第几页
    async provinceCurrentexamples(currentPage) {
      try {
        const resUser = await honorExamplesList({
          keywords: this.CompanyArr.search,
          type: 2,
          page: currentPage,
        });
        this.Company = resUser;
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    // 商标
    //每页下拉显示数据
    async handleSizetrademark(size) {
      try {
        const resUser = await honorKnownList({
          keywords: this.knownArr.search,
          page: size,
        });
        this.knownListArr = resUser.list;
        this.known = resUser;
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    //点击第几页
    async handleCurrenttrademark(currentPage) {
      try {
        const resUser = await honorKnownList({
          keywords: this.knownArr.search,
          page: currentPage,
        });
        this.knownListArr = resUser.list;
        this.known = resUser;
        // console.log(this.Known);
      } catch (e) {
        this.$message.error(e.message);
      }
    },
    changeInput(index) {
      this.form.patent_list[index].message = "";
    },
    addItem(index) {
      if (this.form.patent_list[index].name == "") {
        this.$message.error("请填写专利申请号");
      } else {
        this.FormArr++;
        this.form.patent_list.push({
          name: "",
        });
      }
    },

    async onSuccess(response, file, fileList) {
      if (response) {
        this.CompanyArr.tpic = response.data.url;
        this.$message.success("上传成功");
      }
    },
    async onSuccess2(response, file, fileList) {
      if (response) {
        this.knownArr.tpic = response.data.url;
        this.$message.success("上传成功");
      }
    },
  },
};
</script>

<style lang="less" scoped>
.mini {
  height: 69.5vh;
}
.news_mrt {
  margin-bottom: 30px;
}
.left_w {
  width: 80%;
}
</style>
.mini {
  height: 69.5vh;
}
.news_mrt {
  margin-bottom: 30px;
}
.left_w {
  width: 80%;
}
